<!DOCTYPE html>
<html>

<head>

    {include file="Public/header"}
    <style>
        .row {
            border: 1px solid #ccc;
            margin: 0 auto;
        }

        .agencyM_table tr th {
            text-align: center;
            font-size: 12px;
          
        }

        .textR {
            text-align: right;
        }

        .td2 {
            min-width: 140px
        }
    </style>
</head>

<body class="white-bg" style="color:#333;padding:0px;" class="x_sorll">
<div class="container" style="width: 100%;padding: 0">
  <div class="page-heade">
       <h2 class="title_color text-center">网点详情</h2>
    </div>
    {include file="net/view_common"}
    <table class="table agencyM_table table-bordered">
        <tr class="info">
            <th>序号</th>
            <th>状态</th>
            <th>竞品品类</th>
            <th>竞品名称</th>
            <th>零售价(元)</th>
            <th>竞品规格</th>
            <th>竞品描述</th>
            <th><button class="btn btn-primary" id="addp">添加</button></th>
        </tr>
        {if $supply}
        {volist name="supply" id="row" key="k"}
        <tr>
            <td>{$k}</td>
            <td>正常</td>
            <td>{$row.cate}</td>
            <td><a href="javascript:;">{$row.name}</a></td>
            <td>{$row.price}</td>
            <td>{$row.specs}</td>
            <td>{$row.brief}</td>
            <td>
                <button class="btn btn-primary edit" data-id="{$row.id}">修改</button>
                <button class="btn btn-primary chakanhuibao" data-id="{$row.id}">查看汇报</button>
            </td>
        </tr>
        {/volist}
        {/if}
    </table>
    {if !$supply}
    <div class="ibox-content text-center">
        暂无数据
    </div>
    {/if}
    </div>
<form action="" id="add"></form>
    <!-- 全局js -->
    {include file="Public/footer"}
    <!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
    <script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>

    <!-- jqGrid -->
    <!-- <script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script> -->
    <!--统计代码，可删除-->
    <script>
        $(document).ready(function () {
            //修改联系人
            $('#updateContact').on('click',function () {
                layer.open({
                    type:2,
                    title:'修改',
                    area:['95%','80%'],
                    content:'{:url("form_contact",array("id"=>$data.id))}'
                })
                return false
            })
            //添加竞品
            $('#addp').click(function () {
                var index = layer.open({
                    type: 2,
                    title: '&nbsp;',
                    shadeClose: true,
                    shade: 0.3,
                    maxmin: true, //开启最大化最小化按钮
                    area: ['800px', '500px'],
                    content: $('#add').attr('action')+'?addc=1'
                })
                layer.full(index)
            })
            //修改竞品
            $(".edit").click(function () {
                var id = $(this).data('id')
                layer.open({
                    type: 2,
                    title: '&nbsp;',
                    shadeClose: true,
                    shade: 0.3,
                    maxmin: true, //开启最大化最小化按钮
                    area: ['800px', '500px'],
                    content: $('#add').attr('action')+'?addc=1&c_id='+id
                })
            });

            //查看汇报
            $('.chakanhuibao').click(function () {
                top.layer.open({
                    type: 2,
                    title: '查看汇报',
                    area: ['60%', '60%'],
                    fixed: false, //不固定
                    maxmin: true,
                    content: $('#add').attr('action')+'?chakanhuibao=1'
                });
                return false
            })

        })
    </script>
</body>

</html>